/**
 * yiqihao(一起好商务股份有限公司) copyright 
 */
package com.p2p.front.dal.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import com.p2p.base.dao.BaseMapper;
import com.p2p.front.dal.model.ImageStore;

/**
 *
 * @author leiruiqi@yiqihao.com
 *
 * 2015年3月16日 下午1:44:06
 */
public interface ImageStoreDao extends BaseMapper{

	public void create(ImageStore imageStore);
	
	/*@Update("update p2p_image_store set bizId=#{bizid},bizType=#{biztype},sortNo=#{sortno},status=#{status},pathType=#{pathtype},path=#{path},remark=#{remark},addTime=#{addtime},updateTime=#{updatetime}  where id=#{id}")
	public void update(ImageStore imageStore);
	*/
	@Update("update p2p_image_store set status=#{status},updateTime=NOW() where id=#{id}")
	public int updateStatus(@Param(value="id") Long id,@Param(value="status")Integer status);
	
	@Update("update p2p_image_store set sortNo=#{sortNo},updateTime=NOW() where id=#{id}")
	public int updateSortNo(@Param(value="id")Long id,@Param(value="sortNo")Integer sortNo);
	
	@Update("update p2p_image_store set url=#{url},updateTime=NOW() where id=#{id}")
	public int updateUrl(@Param(value="id")Long id, @Param(value="url")String url);
	
	public List<ImageStore> queryBizAndStatus(ImageStore imageStore);
	
	
}
